#include <cuda_runtime.h>
#include <XnCppWrapper.h>

class LinearInterpolation{
public:
	inline LinearInterpolation(int width, int height) : w(width), h(height){
		cudaMalloc(&in_device, sizeof(float) * width * height);
		cudaMalloc(&out_device, sizeof(float) * (width * 2) * (height * 2));
		
		in_host = new float[width * height];
		out_host = new float[width * 2 * height * 2];	
	}

	inline ~LinearInterpolation(){
		cudaFree(out_device);
		cudaFree(in_device);
		delete[] out_host;
		delete[] in_host;
	}

	float* interpolate(xn::DepthMetaData* in);





private:
	float* in_host;
	float* in_device;
	float* out_host;
	float* out_device;
	int w;
	int h;




};